package com.ych.birdge;

/**
 * Created by 灰灰 on 2017/7/4.
 */
public class Main {
    public static void main(String[] args) {
        Person man = new Man();
        Person lady = new Lady();
        Clothing jacket = new Jacket();
        Clothing  trouser = new Trouser();
      /*  jacket.personDressCloth(man);
        trouser.personDressCloth(man);
        jacket.personDressCloth(lady);
        trouser.personDressCloth(lady);*/
      man.setClothing(new Jacket());
      man.dress();
      man.setClothing( person -> System.out.println(person.getType()+"穿"));
      man.dress();
    }
}
